package com.kurumi.medical.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.kurumi.medical.datasource.TargetDataSource;
import com.kurumi.medical.mapper.HospNoteVersionMapper;
import com.kurumi.medical.pojo.HospNoteVersion;
import com.kurumi.medical.service.HospitalNoteVersionService;

@Transactional
@Service
public class HospitalNoteVersionServiceImpl implements HospitalNoteVersionService{
	@Autowired
	private HospNoteVersionMapper hospNoteVersionMapper;
	
	@TargetDataSource(name="ds1")
	@Transactional(propagation=Propagation.REQUIRED)
	@Override
	public int insertHospitalNoteVersion(HospNoteVersion hospNoteVersion) {
		return hospNoteVersionMapper.insert(hospNoteVersion);
	}

	@TargetDataSource(name="ds1")
	@Transactional(propagation=Propagation.REQUIRED)
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return hospNoteVersionMapper.deleteByPrimaryKey(id);
	}

}
